package model

type Category struct {
	CategoryId string `json:"category_id" gorm:"column:category_id"`
	Name       string `json:"name" gorm:"column:name"`
	Desc       string `json:"desc" gorm:"column:desc"`
	Order      string `json:"order" gorm:"column:order"`
	ParentId   string `json:"parent_id" gorm:"column:parent_id"`
	IsDeleted  bool   `json:"is_deleted" gorm:"is_deleted"`
}

type CategoryResult struct {
	// 参照京东生鲜商城
	// 一级分类 例如：新鲜水果、肉类、海鲜
	C1CategoryID string `gorm:"c1_category_id"`
	C1Name       string `gorm:"column:c1_name"`
	C1Desc       string `gorm:"column:c1_desc"`
	C1Order      int    `gorm:"column:c1_order"`
	C1ParentId   string `gorm:"column:c1_parent_id"`

	// 二级分类 例如：热销水果、时令水果、鱼类、贝类
	C2CategoryID string `gorm:"c2_category_id"`
	C2Name       string `gorm:"column:c2_name"`
	C2Order      int    `gorm:"column:c2_order"`
	C2ParentId   string `gorm:"column:c2_parent_id"`

	// 三级分类 例如：橙子、葡萄、螃蟹、带鱼
	Key          string `json:"key"`
	Id           string `json:"id"`
	C3CategoryID string `gorm:"c3_category_id"`
	C3Name       string `gorm:"column:c3_name"`
	C3Order      int    `gorm:"column:c3_order"`
	C3ParentId   string `gorm:"column:c3_parent_id"`
	IsDeleted    bool   `gorm:"column:C3_is_deleted" json:"is_deleted"`
}
